
using System;
using Habazie.kf2.Core;

namespace Habazie.kf2.Exposition
{
	
	
	public class XButton : Gtk.Button
	{

		public XButton() : base ()
		{
		}
		
		protected override void OnSizeRequested (ref Gtk.Requisition requisition)
		{
			if (this.Child == null) {
				requisition.Height = 4;
				requisition.Width = 4;
			} else {
				requisition = Child.SizeRequest ();
			}
		}
		
/*		protected override bool OnExposeEvent (Gdk.EventExpose evnt)
		{
			if (State == Gtk.StateType.Prelight) {
				int x = Allocation.X;
				int y = Allocation.Y + 1;
				int w = Allocation.Width;
				int h = Allocation.Height - 2;

				GdkWindow.DrawRectangle (this.Style.BackgroundGC (State), true,
					x + 1, y + 2, w - 2, h - 3);
				
//				GdkWindow.DrawRectangle (this.Style.ForegroundGC (State), false,
//					x, y, w - 1, h - 1);
					
				Gdk.GC gc = this.Style.DarkGC (State);
				GdkWindow.DrawLine (gc, x+1, y, x+w-2, y);
				GdkWindow.DrawLine (gc, x+w-1, y+1, x+w-1, y+h-2);
				GdkWindow.DrawLine (gc, x, y+1, x, y+h-2);
				GdkWindow.DrawLine (gc, x+1, y+h-1, x+w-2, y+h-1);
			}
			if (Child != null)
				Child.SendExpose (evnt);
			return false;
		}
*/
	}
}
